#ifndef THRESHOLDDIALOG_H
#define THRESHOLDDIALOG_H
#include <map>
#include "AbstractDialog.h"
#include "ThresholdAction.h"
#include "ThresholdAuto.h"
#include "ui_ThresholdDialog.h"
#include "Ptr.hpp"



using namespace std;
using namespace OOPUtils;



class ThresholdDialog : public AbstractDialog
{

  Q_OBJECT

private:

  Ui::ThresholdDialog ui;

  map< QString, Ptr< ThresholdAuto > > _autoThresholdPresets;

  Ptr< ThresholdAction > _pAction;

  virtual void _openEvent ();

  virtual void _closeEvent (int r);

public:

  ThresholdDialog (QWidget *parent = 0);

public slots:

  void handleThresholdValueChanged (int value);

  void handlePresetSelected (QString itemName);

  void addAutoThresholdPreset (const QString & name,
          Ptr< ThresholdAuto > pPreset);

signals:

  void thresholdChanged (int value);

};

#endif // THRESHOLDDIALOG_H
